3.1.50 \(\int x (a+b x^2)^2 \sin (c+d x) \, dx\) [50]

3.1.50.1 Optimal result
3.1.50.2 Mathematica [A] (verified)
3.1.50.3 Rubi [A] (verified)
3.1.50.4 Maple [A] (verified)
3.1.50.5 Fricas [A] (verification not implemented)
3.1.50.6 Sympy [A] (verification not implemented)
3.1.50.7 Maxima [B] (verification not implemented)
3.1.50.8 Giac [A] (verification not implemented)
3.1.50.9 Mupad [B] (verification not implemented)

3.1.50.1 Optimal result

Integrand size = 17, antiderivative size = 185 \[ \int x \left (a+b x^2\right )^2 \sin (c+d x) \, dx=-\frac {120 b^2 x \cos (c+d x)}{d^5}+\frac {12 a b x \cos (c+d x)}{d^3}-\frac {a^2 x \cos (c+d x)}{d}+\frac {20 b^2 x^3 \cos (c+d x)}{d^3}-\frac {2 a b x^3 \cos (c+d x)}{d}-\frac {b^2 x^5 \cos (c+d x)}{d}+\frac {120 b^2 \sin (c+d x)}{d^6}-\frac {12 a b \sin (c+d x)}{d^4}+\frac {a^2 \sin (c+d x)}{d^2}-\frac {60 b^2 x^2 \sin (c+d x)}{d^4}+\frac {6 a b x^2 \sin (c+d x)}{d^2}+\frac {5 b^2 x^4 \sin (c+d x)}{d^2} \]

output
-120*b^2*x*cos(d*x+c)/d^5+12*a*b*x*cos(d*x+c)/d^3-a^2*x*cos(d*x+c)/d+20*b^ 
2*x^3*cos(d*x+c)/d^3-2*a*b*x^3*cos(d*x+c)/d-b^2*x^5*cos(d*x+c)/d+120*b^2*s 
in(d*x+c)/d^6-12*a*b*sin(d*x+c)/d^4+a^2*sin(d*x+c)/d^2-60*b^2*x^2*sin(d*x+ 
c)/d^4+6*a*b*x^2*sin(d*x+c)/d^2+5*b^2*x^4*sin(d*x+c)/d^2
 
3.1.50.2 Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.61 \[ \int x \left (a+b x^2\right )^2 \sin (c+d x) \, dx=\frac {-d x \left (a^2 d^4+2 a b d^2 \left (-6+d^2 x^2\right )+b^2 \left (120-20 d^2 x^2+d^4 x^4\right )\right ) \cos (c+d x)+\left (a^2 d^4+6 a b d^2 \left (-2+d^2 x^2\right )+5 b^2 \left (24-12 d^2 x^2+d^4 x^4\right )\right ) \sin (c+d x)}{d^6} \]

input
Integrate[x*(a + b*x^2)^2*Sin[c + d*x],x]
 
output
(-(d*x*(a^2*d^4 + 2*a*b*d^2*(-6 + d^2*x^2) + b^2*(120 - 20*d^2*x^2 + d^4*x 
^4))*Cos[c + d*x]) + (a^2*d^4 + 6*a*b*d^2*(-2 + d^2*x^2) + 5*b^2*(24 - 12* 
d^2*x^2 + d^4*x^4))*Sin[c + d*x])/d^6
 
3.1.50.3 Rubi [A] (verified)

Time = 0.43 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {3820, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int x \left (a+b x^2\right )^2 \sin (c+d x) \, dx\)

\(\Big \downarrow \) 3820

\(\displaystyle \int \left (a^2 x \sin (c+d x)+2 a b x^3 \sin (c+d x)+b^2 x^5 \sin (c+d x)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^2 \sin (c+d x)}{d^2}-\frac {a^2 x \cos (c+d x)}{d}-\frac {12 a b \sin (c+d x)}{d^4}+\frac {12 a b x \cos (c+d x)}{d^3}+\frac {6 a b x^2 \sin (c+d x)}{d^2}-\frac {2 a b x^3 \cos (c+d x)}{d}+\frac {120 b^2 \sin (c+d x)}{d^6}-\frac {120 b^2 x \cos (c+d x)}{d^5}-\frac {60 b^2 x^2 \sin (c+d x)}{d^4}+\frac {20 b^2 x^3 \cos (c+d x)}{d^3}+\frac {5 b^2 x^4 \sin (c+d x)}{d^2}-\frac {b^2 x^5 \cos (c+d x)}{d}\)

input
Int[x*(a + b*x^2)^2*Sin[c + d*x],x]
 
output
(-120*b^2*x*Cos[c + d*x])/d^5 + (12*a*b*x*Cos[c + d*x])/d^3 - (a^2*x*Cos[c 
 + d*x])/d + (20*b^2*x^3*Cos[c + d*x])/d^3 - (2*a*b*x^3*Cos[c + d*x])/d - 
(b^2*x^5*Cos[c + d*x])/d + (120*b^2*Sin[c + d*x])/d^6 - (12*a*b*Sin[c + d* 
x])/d^4 + (a^2*Sin[c + d*x])/d^2 - (60*b^2*x^2*Sin[c + d*x])/d^4 + (6*a*b* 
x^2*Sin[c + d*x])/d^2 + (5*b^2*x^4*Sin[c + d*x])/d^2
 

3.1.50.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3820
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*Sin[(c_.) + (d_.)*(x_ 
)], x_Symbol] :> Int[ExpandIntegrand[Sin[c + d*x], (e*x)^m*(a + b*x^n)^p, x 
], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 
3.1.50.4 Maple [A] (verified)

Time = 0.27 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.69

method result size
risch \(-\frac {x \left (b^{2} x^{4} d^{4}+2 a b \,d^{4} x^{2}+a^{2} d^{4}-20 d^{2} x^{2} b^{2}-12 a b \,d^{2}+120 b^{2}\right ) \cos \left (d x +c \right )}{d^{5}}+\frac {\left (5 b^{2} x^{4} d^{4}+6 a b \,d^{4} x^{2}+a^{2} d^{4}-60 d^{2} x^{2} b^{2}-12 a b \,d^{2}+120 b^{2}\right ) \sin \left (d x +c \right )}{d^{6}}\) \(127\)
parallelrisch \(\frac {\left (\left (b \,x^{2}+a \right )^{2} d^{4}+\left (-20 x^{2} b^{2}-12 a b \right ) d^{2}+120 b^{2}\right ) x d \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\left (10 b^{2} x^{4}+12 a b \,x^{2}+2 a^{2}\right ) d^{4}-24 b \left (5 b \,x^{2}+a \right ) d^{2}+240 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\left (\left (b \,x^{2}+a \right )^{2} d^{4}+\left (-20 x^{2} b^{2}-12 a b \right ) d^{2}+120 b^{2}\right ) x d}{d^{6} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\) \(166\)
norman \(\frac {\frac {b^{2} x^{5} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (a^{2} d^{4}-12 a b \,d^{2}+120 b^{2}\right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d^{5}}-\frac {b^{2} x^{5}}{d}-\frac {\left (a^{2} d^{4}-12 a b \,d^{2}+120 b^{2}\right ) x}{d^{5}}+\frac {2 \left (a^{2} d^{4}-12 a b \,d^{2}+120 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d^{6}}+\frac {10 b^{2} x^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d^{2}}-\frac {2 b \left (a \,d^{2}-10 b \right ) x^{3}}{d^{3}}+\frac {12 b \left (a \,d^{2}-10 b \right ) x^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d^{4}}+\frac {2 b \left (a \,d^{2}-10 b \right ) x^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d^{3}}}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\) \(240\)
meijerg \(\frac {32 b^{2} \sqrt {\pi }\, \sin \left (c \right ) \left (-\frac {15}{4 \sqrt {\pi }}+\frac {\left (\frac {15}{8} d^{4} x^{4}-\frac {45}{2} d^{2} x^{2}+45\right ) \cos \left (d x \right )}{12 \sqrt {\pi }}+\frac {x d \left (\frac {3}{8} d^{4} x^{4}-\frac {15}{2} d^{2} x^{2}+45\right ) \sin \left (d x \right )}{12 \sqrt {\pi }}\right )}{d^{6}}+\frac {32 b^{2} \sqrt {\pi }\, \cos \left (c \right ) \left (-\frac {x d \left (\frac {7}{8} d^{4} x^{4}-\frac {35}{2} d^{2} x^{2}+105\right ) \cos \left (d x \right )}{28 \sqrt {\pi }}+\frac {\left (\frac {35}{8} d^{4} x^{4}-\frac {105}{2} d^{2} x^{2}+105\right ) \sin \left (d x \right )}{28 \sqrt {\pi }}\right )}{d^{6}}+\frac {16 a b \sqrt {\pi }\, \sin \left (c \right ) \left (\frac {3}{4 \sqrt {\pi }}-\frac {\left (-\frac {3 d^{2} x^{2}}{2}+3\right ) \cos \left (d x \right )}{4 \sqrt {\pi }}-\frac {d x \left (-\frac {d^{2} x^{2}}{2}+3\right ) \sin \left (d x \right )}{4 \sqrt {\pi }}\right )}{d^{4}}+\frac {16 a b \sqrt {\pi }\, \cos \left (c \right ) \left (\frac {x d \left (-\frac {5 d^{2} x^{2}}{2}+15\right ) \cos \left (d x \right )}{20 \sqrt {\pi }}-\frac {\left (-\frac {15 d^{2} x^{2}}{2}+15\right ) \sin \left (d x \right )}{20 \sqrt {\pi }}\right )}{d^{4}}+\frac {2 a^{2} \sqrt {\pi }\, \sin \left (c \right ) \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\cos \left (d x \right )}{2 \sqrt {\pi }}+\frac {d x \sin \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{2}}+\frac {2 a^{2} \sqrt {\pi }\, \cos \left (c \right ) \left (-\frac {d x \cos \left (d x \right )}{2 \sqrt {\pi }}+\frac {\sin \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{2}}\) \(331\)
parts \(-\frac {b^{2} x^{5} \cos \left (d x +c \right )}{d}-\frac {2 a b \,x^{3} \cos \left (d x +c \right )}{d}-\frac {a^{2} x \cos \left (d x +c \right )}{d}+\frac {a^{2} \sin \left (d x +c \right )+\frac {6 a b \,c^{2} \sin \left (d x +c \right )}{d^{2}}-\frac {12 a b c \left (\cos \left (d x +c \right )+\left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{2}}+\frac {6 a b \left (\left (d x +c \right )^{2} \sin \left (d x +c \right )-2 \sin \left (d x +c \right )+2 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{2}}+\frac {5 b^{2} c^{4} \sin \left (d x +c \right )}{d^{4}}-\frac {20 b^{2} c^{3} \left (\cos \left (d x +c \right )+\left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{4}}+\frac {30 b^{2} c^{2} \left (\left (d x +c \right )^{2} \sin \left (d x +c \right )-2 \sin \left (d x +c \right )+2 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{4}}-\frac {20 b^{2} c \left (\left (d x +c \right )^{3} \sin \left (d x +c \right )+3 \left (d x +c \right )^{2} \cos \left (d x +c \right )-6 \cos \left (d x +c \right )-6 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{4}}+\frac {5 b^{2} \left (\left (d x +c \right )^{4} \sin \left (d x +c \right )+4 \left (d x +c \right )^{3} \cos \left (d x +c \right )-12 \left (d x +c \right )^{2} \sin \left (d x +c \right )+24 \sin \left (d x +c \right )-24 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{4}}}{d^{2}}\) \(379\)
derivativedivides \(\frac {a^{2} c \cos \left (d x +c \right )+a^{2} \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )+\frac {2 a b \,c^{3} \cos \left (d x +c \right )}{d^{2}}+\frac {6 a b \,c^{2} \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{2}}-\frac {6 a b c \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{2}}+\frac {2 a b \left (-\left (d x +c \right )^{3} \cos \left (d x +c \right )+3 \left (d x +c \right )^{2} \sin \left (d x +c \right )-6 \sin \left (d x +c \right )+6 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{2}}+\frac {b^{2} c^{5} \cos \left (d x +c \right )}{d^{4}}+\frac {5 b^{2} c^{4} \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{4}}-\frac {10 b^{2} c^{3} \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{4}}+\frac {10 b^{2} c^{2} \left (-\left (d x +c \right )^{3} \cos \left (d x +c \right )+3 \left (d x +c \right )^{2} \sin \left (d x +c \right )-6 \sin \left (d x +c \right )+6 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{4}}-\frac {5 b^{2} c \left (-\left (d x +c \right )^{4} \cos \left (d x +c \right )+4 \left (d x +c \right )^{3} \sin \left (d x +c \right )+12 \left (d x +c \right )^{2} \cos \left (d x +c \right )-24 \cos \left (d x +c \right )-24 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{4}}+\frac {b^{2} \left (-\left (d x +c \right )^{5} \cos \left (d x +c \right )+5 \left (d x +c \right )^{4} \sin \left (d x +c \right )+20 \left (d x +c \right )^{3} \cos \left (d x +c \right )-60 \left (d x +c \right )^{2} \sin \left (d x +c \right )+120 \sin \left (d x +c \right )-120 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{4}}}{d^{2}}\) \(514\)
default \(\frac {a^{2} c \cos \left (d x +c \right )+a^{2} \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )+\frac {2 a b \,c^{3} \cos \left (d x +c \right )}{d^{2}}+\frac {6 a b \,c^{2} \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{2}}-\frac {6 a b c \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{2}}+\frac {2 a b \left (-\left (d x +c \right )^{3} \cos \left (d x +c \right )+3 \left (d x +c \right )^{2} \sin \left (d x +c \right )-6 \sin \left (d x +c \right )+6 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{2}}+\frac {b^{2} c^{5} \cos \left (d x +c \right )}{d^{4}}+\frac {5 b^{2} c^{4} \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{4}}-\frac {10 b^{2} c^{3} \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{4}}+\frac {10 b^{2} c^{2} \left (-\left (d x +c \right )^{3} \cos \left (d x +c \right )+3 \left (d x +c \right )^{2} \sin \left (d x +c \right )-6 \sin \left (d x +c \right )+6 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{4}}-\frac {5 b^{2} c \left (-\left (d x +c \right )^{4} \cos \left (d x +c \right )+4 \left (d x +c \right )^{3} \sin \left (d x +c \right )+12 \left (d x +c \right )^{2} \cos \left (d x +c \right )-24 \cos \left (d x +c \right )-24 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{4}}+\frac {b^{2} \left (-\left (d x +c \right )^{5} \cos \left (d x +c \right )+5 \left (d x +c \right )^{4} \sin \left (d x +c \right )+20 \left (d x +c \right )^{3} \cos \left (d x +c \right )-60 \left (d x +c \right )^{2} \sin \left (d x +c \right )+120 \sin \left (d x +c \right )-120 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{4}}}{d^{2}}\) \(514\)

input
int(x*(b*x^2+a)^2*sin(d*x+c),x,method=_RETURNVERBOSE)
 
output
-1/d^5*x*(b^2*d^4*x^4+2*a*b*d^4*x^2+a^2*d^4-20*b^2*d^2*x^2-12*a*b*d^2+120* 
b^2)*cos(d*x+c)+(5*b^2*d^4*x^4+6*a*b*d^4*x^2+a^2*d^4-60*b^2*d^2*x^2-12*a*b 
*d^2+120*b^2)/d^6*sin(d*x+c)
 
3.1.50.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.68 \[ \int x \left (a+b x^2\right )^2 \sin (c+d x) \, dx=-\frac {{\left (b^{2} d^{5} x^{5} + 2 \, {\left (a b d^{5} - 10 \, b^{2} d^{3}\right )} x^{3} + {\left (a^{2} d^{5} - 12 \, a b d^{3} + 120 \, b^{2} d\right )} x\right )} \cos \left (d x + c\right ) - {\left (5 \, b^{2} d^{4} x^{4} + a^{2} d^{4} - 12 \, a b d^{2} + 6 \, {\left (a b d^{4} - 10 \, b^{2} d^{2}\right )} x^{2} + 120 \, b^{2}\right )} \sin \left (d x + c\right )}{d^{6}} \]

input
integrate(x*(b*x^2+a)^2*sin(d*x+c),x, algorithm="fricas")
 
output
-((b^2*d^5*x^5 + 2*(a*b*d^5 - 10*b^2*d^3)*x^3 + (a^2*d^5 - 12*a*b*d^3 + 12 
0*b^2*d)*x)*cos(d*x + c) - (5*b^2*d^4*x^4 + a^2*d^4 - 12*a*b*d^2 + 6*(a*b* 
d^4 - 10*b^2*d^2)*x^2 + 120*b^2)*sin(d*x + c))/d^6
 
3.1.50.6 Sympy [A] (verification not implemented)

Time = 0.43 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.22 \[ \int x \left (a+b x^2\right )^2 \sin (c+d x) \, dx=\begin {cases} - \frac {a^{2} x \cos {\left (c + d x \right )}}{d} + \frac {a^{2} \sin {\left (c + d x \right )}}{d^{2}} - \frac {2 a b x^{3} \cos {\left (c + d x \right )}}{d} + \frac {6 a b x^{2} \sin {\left (c + d x \right )}}{d^{2}} + \frac {12 a b x \cos {\left (c + d x \right )}}{d^{3}} - \frac {12 a b \sin {\left (c + d x \right )}}{d^{4}} - \frac {b^{2} x^{5} \cos {\left (c + d x \right )}}{d} + \frac {5 b^{2} x^{4} \sin {\left (c + d x \right )}}{d^{2}} + \frac {20 b^{2} x^{3} \cos {\left (c + d x \right )}}{d^{3}} - \frac {60 b^{2} x^{2} \sin {\left (c + d x \right )}}{d^{4}} - \frac {120 b^{2} x \cos {\left (c + d x \right )}}{d^{5}} + \frac {120 b^{2} \sin {\left (c + d x \right )}}{d^{6}} & \text {for}\: d \neq 0 \\\left (\frac {a^{2} x^{2}}{2} + \frac {a b x^{4}}{2} + \frac {b^{2} x^{6}}{6}\right ) \sin {\left (c \right )} & \text {otherwise} \end {cases} \]

input
integrate(x*(b*x**2+a)**2*sin(d*x+c),x)
 
output
Piecewise((-a**2*x*cos(c + d*x)/d + a**2*sin(c + d*x)/d**2 - 2*a*b*x**3*co 
s(c + d*x)/d + 6*a*b*x**2*sin(c + d*x)/d**2 + 12*a*b*x*cos(c + d*x)/d**3 - 
 12*a*b*sin(c + d*x)/d**4 - b**2*x**5*cos(c + d*x)/d + 5*b**2*x**4*sin(c + 
 d*x)/d**2 + 20*b**2*x**3*cos(c + d*x)/d**3 - 60*b**2*x**2*sin(c + d*x)/d* 
*4 - 120*b**2*x*cos(c + d*x)/d**5 + 120*b**2*sin(c + d*x)/d**6, Ne(d, 0)), 
 ((a**2*x**2/2 + a*b*x**4/2 + b**2*x**6/6)*sin(c), True))
 
3.1.50.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 438 vs. \(2 (185) = 370\).

Time = 0.21 (sec) , antiderivative size = 438, normalized size of antiderivative = 2.37 \[ \int x \left (a+b x^2\right )^2 \sin (c+d x) \, dx=\frac {a^{2} c \cos \left (d x + c\right ) + \frac {b^{2} c^{5} \cos \left (d x + c\right )}{d^{4}} + \frac {2 \, a b c^{3} \cos \left (d x + c\right )}{d^{2}} - {\left ({\left (d x + c\right )} \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right )} a^{2} - \frac {5 \, {\left ({\left (d x + c\right )} \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right )} b^{2} c^{4}}{d^{4}} - \frac {6 \, {\left ({\left (d x + c\right )} \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right )} a b c^{2}}{d^{2}} + \frac {10 \, {\left ({\left ({\left (d x + c\right )}^{2} - 2\right )} \cos \left (d x + c\right ) - 2 \, {\left (d x + c\right )} \sin \left (d x + c\right )\right )} b^{2} c^{3}}{d^{4}} + \frac {6 \, {\left ({\left ({\left (d x + c\right )}^{2} - 2\right )} \cos \left (d x + c\right ) - 2 \, {\left (d x + c\right )} \sin \left (d x + c\right )\right )} a b c}{d^{2}} - \frac {10 \, {\left ({\left ({\left (d x + c\right )}^{3} - 6 \, d x - 6 \, c\right )} \cos \left (d x + c\right ) - 3 \, {\left ({\left (d x + c\right )}^{2} - 2\right )} \sin \left (d x + c\right )\right )} b^{2} c^{2}}{d^{4}} - \frac {2 \, {\left ({\left ({\left (d x + c\right )}^{3} - 6 \, d x - 6 \, c\right )} \cos \left (d x + c\right ) - 3 \, {\left ({\left (d x + c\right )}^{2} - 2\right )} \sin \left (d x + c\right )\right )} a b}{d^{2}} + \frac {5 \, {\left ({\left ({\left (d x + c\right )}^{4} - 12 \, {\left (d x + c\right )}^{2} + 24\right )} \cos \left (d x + c\right ) - 4 \, {\left ({\left (d x + c\right )}^{3} - 6 \, d x - 6 \, c\right )} \sin \left (d x + c\right )\right )} b^{2} c}{d^{4}} - \frac {{\left ({\left ({\left (d x + c\right )}^{5} - 20 \, {\left (d x + c\right )}^{3} + 120 \, d x + 120 \, c\right )} \cos \left (d x + c\right ) - 5 \, {\left ({\left (d x + c\right )}^{4} - 12 \, {\left (d x + c\right )}^{2} + 24\right )} \sin \left (d x + c\right )\right )} b^{2}}{d^{4}}}{d^{2}} \]

input
integrate(x*(b*x^2+a)^2*sin(d*x+c),x, algorithm="maxima")
 
output
(a^2*c*cos(d*x + c) + b^2*c^5*cos(d*x + c)/d^4 + 2*a*b*c^3*cos(d*x + c)/d^ 
2 - ((d*x + c)*cos(d*x + c) - sin(d*x + c))*a^2 - 5*((d*x + c)*cos(d*x + c 
) - sin(d*x + c))*b^2*c^4/d^4 - 6*((d*x + c)*cos(d*x + c) - sin(d*x + c))* 
a*b*c^2/d^2 + 10*(((d*x + c)^2 - 2)*cos(d*x + c) - 2*(d*x + c)*sin(d*x + c 
))*b^2*c^3/d^4 + 6*(((d*x + c)^2 - 2)*cos(d*x + c) - 2*(d*x + c)*sin(d*x + 
 c))*a*b*c/d^2 - 10*(((d*x + c)^3 - 6*d*x - 6*c)*cos(d*x + c) - 3*((d*x + 
c)^2 - 2)*sin(d*x + c))*b^2*c^2/d^4 - 2*(((d*x + c)^3 - 6*d*x - 6*c)*cos(d 
*x + c) - 3*((d*x + c)^2 - 2)*sin(d*x + c))*a*b/d^2 + 5*(((d*x + c)^4 - 12 
*(d*x + c)^2 + 24)*cos(d*x + c) - 4*((d*x + c)^3 - 6*d*x - 6*c)*sin(d*x + 
c))*b^2*c/d^4 - (((d*x + c)^5 - 20*(d*x + c)^3 + 120*d*x + 120*c)*cos(d*x 
+ c) - 5*((d*x + c)^4 - 12*(d*x + c)^2 + 24)*sin(d*x + c))*b^2/d^4)/d^2
 
3.1.50.8 Giac [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 129, normalized size of antiderivative = 0.70 \[ \int x \left (a+b x^2\right )^2 \sin (c+d x) \, dx=-\frac {{\left (b^{2} d^{5} x^{5} + 2 \, a b d^{5} x^{3} + a^{2} d^{5} x - 20 \, b^{2} d^{3} x^{3} - 12 \, a b d^{3} x + 120 \, b^{2} d x\right )} \cos \left (d x + c\right )}{d^{6}} + \frac {{\left (5 \, b^{2} d^{4} x^{4} + 6 \, a b d^{4} x^{2} + a^{2} d^{4} - 60 \, b^{2} d^{2} x^{2} - 12 \, a b d^{2} + 120 \, b^{2}\right )} \sin \left (d x + c\right )}{d^{6}} \]

input
integrate(x*(b*x^2+a)^2*sin(d*x+c),x, algorithm="giac")
 
output
-(b^2*d^5*x^5 + 2*a*b*d^5*x^3 + a^2*d^5*x - 20*b^2*d^3*x^3 - 12*a*b*d^3*x 
+ 120*b^2*d*x)*cos(d*x + c)/d^6 + (5*b^2*d^4*x^4 + 6*a*b*d^4*x^2 + a^2*d^4 
 - 60*b^2*d^2*x^2 - 12*a*b*d^2 + 120*b^2)*sin(d*x + c)/d^6
 
3.1.50.9 Mupad [B] (verification not implemented)

Time = 6.33 (sec) , antiderivative size = 151, normalized size of antiderivative = 0.82 \[ \int x \left (a+b x^2\right )^2 \sin (c+d x) \, dx=\frac {\sin \left (c+d\,x\right )\,\left (a^2\,d^4-12\,a\,b\,d^2+120\,b^2\right )}{d^6}-\frac {b^2\,x^5\,\cos \left (c+d\,x\right )}{d}+\frac {5\,b^2\,x^4\,\sin \left (c+d\,x\right )}{d^2}-\frac {x\,\cos \left (c+d\,x\right )\,\left (a^2\,d^4-12\,a\,b\,d^2+120\,b^2\right )}{d^5}+\frac {2\,x^3\,\cos \left (c+d\,x\right )\,\left (10\,b^2-a\,b\,d^2\right )}{d^3}-\frac {6\,x^2\,\sin \left (c+d\,x\right )\,\left (10\,b^2-a\,b\,d^2\right )}{d^4} \]

input
int(x*sin(c + d*x)*(a + b*x^2)^2,x)
 
output
(sin(c + d*x)*(120*b^2 + a^2*d^4 - 12*a*b*d^2))/d^6 - (b^2*x^5*cos(c + d*x 
))/d + (5*b^2*x^4*sin(c + d*x))/d^2 - (x*cos(c + d*x)*(120*b^2 + a^2*d^4 - 
 12*a*b*d^2))/d^5 + (2*x^3*cos(c + d*x)*(10*b^2 - a*b*d^2))/d^3 - (6*x^2*s 
in(c + d*x)*(10*b^2 - a*b*d^2))/d^4